<html>
	<head>
		<meta charset="utf-8"/>
		<title>BArray</title>
		<link rel="stylesheet" type="text/css" href="../style.css"/>
	</head>
	<body>
		<h1>BArray</h1>
		<p>Inherites from <a href="BThing.html">BThing</a></p>
		<h2>public</h2>
		<table id="public">
			<tr><td align="right">inline </td><td><a href="#BArray()">BArray</a>();</td></tr>
			<tr><td align="right">inline </td><td><a href="#BArray(int,const T&)">BArray</a>(int size, const T& v = T());</td></tr>
			<tr><td align="right">inline </td><td><a href="#BArray(const BArray&)">BArray</a>(const BArray& other);</td></tr>
			<tr><td align="right">inline </td><td><a href="#BArray(const BArray<TU>&)">BArray</a>(const BArray&ltTU&gt& other);</td></tr>
			<tr><td align="right">inline </td><td><a href="#~BArray()">~BArray</a>();</td></tr>
			<tr><td align="right">inline bool </td><td><a href="#empty()">empty</a>() const;</td></tr>
			<tr><td align="right">inline int </td><td><a href="#size()">size</a>() const;</td></tr>
			<tr><td align="right">inline int </td><td><a href="#capacity()">capacity</a>() const;</td></tr>
			<tr><td align="right">inline bool </td><td><a href="#resize(int)">resize</a>(int size);</td></tr>
			<tr><td align="right">inline void </td><td><a href="#reset()">reset</a>();</td></tr>
			<tr><td align="right">inline void </td><td><a href="#clear()">clear</a>();</td></tr>
			<tr><td align="right">inline bool </td><td><a href="#check(int)">check</a>(int index) const;</td></tr>
			<tr><td align="right">inline void </td><td><a href="#correct(int&)">correct</a>(int& index) const;</td></tr>
			<tr><td align="right">inline bool </td><td><a href="#set(int, const T&)">set</a>(int pos, const T& value);</td></tr>
			<tr><td align="right">inline bool </td><td><a href="#fill(const T&)">fill</a>(const T& value);</td></tr>
			<tr><td align="right">inline bool </td><td><a href="#fill(const T&, int, int)">fill</a>(const T& value, int begin, int count);</td></tr>
			<tr><td align="right">inline bool </td><td><a href="#fill(const T*, int)">fill</a>(const T* data, int count);</td></tr>
			<tr><td align="right">inline int </td><td><a href="#find(const UT&,int)">find</a>(const UT& value, int pos = 0) const;</td></tr>
			<tr><td align="right">inline int </td><td><a href="#find_min()">find_min</a>() const;</td></tr>
			<tr><td align="right">inline int </td><td><a href="#find_max()">find_max</a>() const;</td></tr>
			<tr><td align="right">inline int </td><td><a href="#count(const UT&)">count</a>(const UT& value) const;</td></tr>
			<tr><td align="right">inline bool </td><td><a href="#contain(const UT&)">contain</a>(const UT& value) const;</td></tr>
			<tr><td align="right">inline int </td><td><a href="#replace(const T&, const T&)">replace</a>(const T& oldValue, const T& newValue);</td></tr>
			<tr><td align="right">inline bool </td><td><a href="#move(const UT&, int)">move</a>(const UT& value, int pos);</td></tr>
			<tr><td align="right">inline bool </td><td><a href="#move(int, int)">move</a>(int index, int pos);</td></tr>
			<tr><td align="right">inline bool </td><td><a href="#bubble(int)">bubble</a>(int index);</td></tr>
			<tr><td align="right">inline bool </td><td><a href="#swap(int, int)">swap</a>(int index0, int index1);</td></tr>
			<tr><td align="right">inline T& </td><td><a href="#first()">first</a>();</td></tr>
			<tr><td align="right">inline const T& </td><td><a href="#first()">first</a>() const;</td></tr>
			<tr><td align="right">inline T& </td><td><a href="#last()">last</a>();</td></tr>
			<tr><td align="right">inline const T& </td><td><a href="#last()">last</a>() const;</td></tr>
			<tr><td align="right">inline T& </td><td><a href="#middle()">middle</a>();</td></tr>
			<tr><td align="right">inline const T& </td><td><a href="#middle()">middle</a>() const;</td></tr>
			<tr><td align="right">inline T& </td><td><a href="#min()">min</a>();</td></tr>
			<tr><td align="right">inline const T& </td><td><a href="#min()">min</a>() const;</td></tr>
			<tr><td align="right">inline T& </td><td><a href="#max()">max</a>();</td></tr>
			<tr><td align="right">inline const T& </td><td><a href="#max()">max</a>() const;</td></tr>
			<tr><td align="right">inline T* </td><td><a href="#data()">data</a>();</td></tr>
			<tr><td align="right">inline const T* </td><td><a href="#data()">data</a>() const;</td></tr>
			<tr><td align="right">inline bool </td><td><a href="#push()">push</a>();</td></tr>
			<tr><td align="right">inline bool </td><td><a href="#pop()">pop</a>();</td></tr>
			<tr><td align="right">inline bool </td><td><a href="#push(const UT&)">push</a>(const UT& value);</td></tr>
			<tr><td align="right">inline bool </td><td><a href="#pop(UT&)">pop</a>(UT& value);</td></tr>
			<tr><td align="right">inline bool </td><td><a href="#append(const T*, int)">append</a>(const T* values, int size);</td></tr>
			<tr><td align="right">inline bool </td><td><a href="#append(const T&,int)">append</a>(const T& value, int size = 1);</td></tr>
			<tr><td align="right">inline bool </td><td><a href="#append(const BArray&,int,int)">append</a>(const BArray& other, int pos = 0, int count = -1);</td></tr>
			<tr><td align="right">inline bool </td><td><a href="#insert(int, const T&,int)">insert</a>(int pos, const T& value, int size = 1);</td></tr>
			<tr><td align="right">inline bool </td><td><a href="#insert(int, const T*, int)">insert</a>(int pos, const T* values, int size);</td></tr>
			<tr><td align="right">inline bool </td><td><a href="#insert(int, const BArray&,int,int)">insert</a>(int pos, const BArray& other, int first = 0, int count = -1);</td></tr>
			<tr><td align="right">inline bool </td><td><a href="#remove(int,int)">remove</a>(int pos, int count = 1);</td></tr>
			<tr><td align="right">inline bool </td><td><a href="#remove(const UT&)">remove</a>(const UT& value);</td></tr>
			<tr><td align="right">inline bool </td><td><a href="#remove(const BArray<UT>&)">remove</a>(const BArray&ltUT&gt& other);</td></tr>
			<tr><td align="right">inline int </td><td><a href="#removeAll(const UT&)">removeAll</a>(const UT& value);</td></tr>
			<tr><td align="right">inline bool </td><td><a href="#sort(int)">sort</a>(int direction = 1);</td></tr>
			<tr><td align="right">inline T& </td><td><a href="#at(int)">at</a>(int index);</td></tr>
			<tr><td align="right">inline const T& </td><td><a href="#at(int)">at</a>(int index) const;</td></tr>
			<tr><td align="right">inline T& </td><td><a href="#operator()(int)">operator</a>()(int index);</td></tr>
			<tr><td align="right">inline const T& </td><td><a href="#operator()(int)">operator</a>()(int index) const;</td></tr>
			<tr><td align="right">inline T& </td><td><a href="#operator[](int)">operator[]</a>(int index);</td></tr>
			<tr><td align="right">inline const T& </td><td><a href="#operator[](int)">operator[]</a>(int index) const;</td></tr>
			<tr><td align="right">inline const BArray& </td><td><a href="#operator = (const T&)">operator = </a>(const T& value);</td></tr>
			<tr><td align="right">inline const BArray& </td><td><a href="#operator = (const BArray&)">operator = </a>(const BArray& other);</td></tr>
			<tr><td align="right">inline BArray </td><td><a href="#operator + (const UT&)">operator + </a>(const UT& value) const;</td></tr>
			<tr><td align="right">inline BArray </td><td><a href="#operator + (const BArray&)">operator + </a>(const BArray& other) const;</td></tr>
			<tr><td align="right">inline void </td><td><a href="#operator += (const UT&)">operator += </a>(const UT& value);</td></tr>
			<tr><td align="right">inline void </td><td><a href="#operator += (const BArray&)">operator += </a>(const BArray& other);</td></tr>
			<tr><td align="right">inline void </td><td><a href="#operator -= (const UT&)">operator -= </a>(const UT& value);</td></tr>
			<tr><td align="right">inline void </td><td><a href="#operator -= (const BArray&)">operator -= </a>(const BArray& other);</td></tr>
			<tr><td align="right">inline BArray& </td><td><a href="#operator << (const UT&)">operator << </a>(const UT& value);</td></tr>
			<tr><td align="right">inline BArray& </td><td><a href="#operator << (const BArray&)">operator << </a>(const BArray& other);</td></tr>
			<tr><td align="right">inline void </td><td><a href="#operator >> (UT&)">operator >> </a>(UT& value);</td></tr>
			<tr><td align="right">inline void </td><td><a href="#operator >> (BArray&)">operator >> </a>(BArray& other) const;</td></tr>
			<tr><td align="right">inline bool </td><td><a href="#operator == (const BArray&)">operator == </a>(const BArray& other) const;</td></tr>
			<tr><td align="right">inline bool </td><td><a href="#operator != (const BArray&)">operator != </a>(const BArray& other) const;</td></tr>
		</table>
		<div id="desc">
			<h2>Detailed Description : </h2>
			<p>
				 The BArray class is a template class that provides a dynamic array. </p>
			<p>BVector is not defined as a array because it is used for a three scalar point in 3D scene space, and Array is an array.</p>
			<p>The BArray is one of generic container of BWE, it stores its items in adjacent memory locations and provides fast index-based access. This class don't provide iterator because index is best handle for fast accessing data.</p>
		</div>
		<h2 id="docs">Member Documentation</h2>
		<div id="BArray()">
			<h3>inline BArray();</h3>
			<p>Constructs an empty array.</p>
		</div>
		<div id="BArray(int,const T&)">
			<h3>inline BArray(int size, const T& v = T());</h3>
			<p>Constructs a vector with an initial size of size elements. The elements are initialized with a value.</p>
		</div>
		<div id="BArray(const BArray&)">
			<h3>inline BArray(const BArray& other);</h3>
			<p>Constructs a array by coping another array.</p>
		</div>
		<div id="BArray(const BArray<TU>&)">
			<h3>inline BArray(const BArray&ltTU&gt& other);</h3>
			<p>Constructs an array by coping another array which could be implement with different type(TU type unknown).</p>
		</div>
		<div id="~BArray()">
			<h3>inline ~BArray();</h3>
			<p>Releases an array.</p>
		</div>
		<div id="empty()">
			<h3>inline bool empty() const;</h3>
			<p>Returns true if the array is empty; otherwise returns false. An empty array means it don't have any item but capacity could be a lot. BArray::reset() just clear item objects but don't adjust capacity.</p>
		</div>
		<div id="size()">
			<h3>inline int size() const;</h3>
			<p>Return the number of items of this array.</p>
		</div>
		<div id="capacity()">
			<h3>inline int capacity() const;</h3>
			<p>Returns the maximum number of items that can be stored in the array without forcing a reallocation.</p>
		</div>
		<div id="resize(int)">
			<h3>inline bool resize(int size);</h3>
			<p>Sets the size of the array to size. If size is greater than the current size, elements are added to the end; the new elements are initialized with a default-constructed value. If size is less than the current size, elements are removed from the end.</p>
		</div>
		<div id="reset()">
			<h3>inline void reset();</h3>
			<p>This will remove all elements without release the memory, size will be 0, and capacity won't change. This is usefull while you need to store and take elements very frequently, because adjust the momery is very expensive.</p>
		</div>
		<div id="clear()">
			<h3>inline void clear();</h3>
			<p>Remove all elements and release the momery, then data will be null, size and capacity will be zero.</p>
		</div>
		<div id="check(int)">
			<h3>inline bool check(int index) const;</h3>
			<p>Checks if the index is valid for this array, if index &gt= 0 and index &lt array.size() return true, otherwise return false.</p>
		</div>
		<div id="correct(int&)">
			<h3>inline void correct(int& index) const;</h3>
		</div>
		<div id="set(int, const T&)">
			<h3>inline bool set(int pos, const T& value);</h3>
			<p>Replace the value at pos to new value.</p>
		</div>
		<div id="fill(const T&)">
			<h3>inline bool fill(const T& value);</h3>
			<p>Assigns the value to every last one of item in this array.</p>
		</div>
		<div id="fill(const T&, int, int)">
			<h3>inline bool fill(const T& value, int begin, int count);</h3>
			<p>Assigns the value to elements in range specified by pos and count.</p>
		</div>
		<div id="fill(const T*, int)">
			<h3>inline bool fill(const T* data, int count);</h3>
			<p>Covers the elements from head of array.</p>
		</div>
		<div id="find(const UT&,int)">
			<h3>inline int find(const UT& value, int pos = 0) const;</h3>
			<p>Try to find an element equals the value from pos, returns index of first element found.</p>
		</div>
		<div id="find_min()">
			<h3>inline int find_min() const;</h3>
			<p>Get the index of mininum element.</p>
		</div>
		<div id="find_max()">
			<h3>inline int find_max() const;</h3>
			<p>Get the index of maxinum element.</p>
		</div>
		<div id="count(const UT&)">
			<h3>inline int count(const UT& value) const;</h3>
			<p>Returns the number of occurrences of value in the array. This function requires the value type to have an implementation of operator==().</p>
		</div>
		<div id="contain(const UT&)">
			<h3>inline bool contain(const UT& value) const;</h3>
			<p>Checks if this array contains a element equal the value. Atention, "contain" without 's' if it is member of core container, otherwise it is contains.</p>
		</div>
		<div id="replace(const T&, const T&)">
			<h3>inline int replace(const T& oldValue, const T& newValue);</h3>
			<p>Replace every old value to new value, and return the number of elements replaced.</p>
		</div>
		<div id="move(const UT&, int)">
			<h3>inline bool move(const UT& value, int pos);</h3>
			<p>Moves the first element equals the value to special position.</p>
		</div>
		<div id="move(int, int)">
			<h3>inline bool move(int index, int pos);</h3>
			<p>Moves the element of index to special position.</p>
		</div>
		<div id="bubble(int)">
			<h3>inline bool bubble(int index);</h3>
			<p>Moves the element of index to index - 1, this is simple way to sort the array.</p>
		</div>
		<div id="swap(int, int)">
			<h3>inline bool swap(int index0, int index1);</h3>
			<p>Swaps the position of two elements of index0 and index1.</p>
		</div>
		<div id="first()">
			<h3>inline T& first();</h3>
			<p>Get the first element of this array.</p>
		</div>
		<div id="first()">
			<h3>inline const T& first() const;</h3>
		</div>
		<div id="last()">
			<h3>inline T& last();</h3>
			<p>Get the last element of this array.</p>
		</div>
		<div id="last()">
			<h3>inline const T& last() const;</h3>
		</div>
		<div id="middle()">
			<h3>inline T& middle();</h3>
			<p>Get the element at the middle position, if size is even middle index will move one to head.</p>
		</div>
		<div id="middle()">
			<h3>inline const T& middle() const;</h3>
		</div>
		<div id="min()">
			<h3>inline T& min();</h3>
			<p>Return the element of mininum value.</p>
		</div>
		<div id="min()">
			<h3>inline const T& min() const;</h3>
		</div>
		<div id="max()">
			<h3>inline T& max();</h3>
			<p>Return the element of maxinum value.</p>
		</div>
		<div id="max()">
			<h3>inline const T& max() const;</h3>
		</div>
		<div id="data()">
			<h3>inline T* data();</h3>
			<p/>
		</div>
		<div id="data()">
			<h3>inline const T* data() const;</h3>
			<p/>
		</div>
		<div id="push()">
			<h3>inline bool push();</h3>
			<p>Equals append(T()).</p>
		</div>
		<div id="pop()">
			<h3>inline bool pop();</h3>
			<p>Removes the last element.</p>
		</div>
		<div id="push(const UT&)">
			<h3>inline bool push(const UT& value);</h3>
		</div>
		<div id="pop(UT&)">
			<h3>inline bool pop(UT& value);</h3>
		</div>
		<div id="append(const T*, int)">
			<h3>inline bool append(const T* values, int size);</h3>
			<p>Add a lot of element to array at the tail by copy the values.</p>
		</div>
		<div id="append(const T&,int)">
			<h3>inline bool append(const T& value, int size = 1);</h3>
			<p>Add a lot of elements to the array with the same value.</p>
		</div>
		<div id="append(const BArray&,int,int)">
			<h3>inline bool append(const BArray& other, int pos = 0, int count = -1);</h3>
			<p>Add other's element in the special range to the tail of this array.</p>
		</div>
		<div id="insert(int, const T&,int)">
			<h3>inline bool insert(int pos, const T& value, int size = 1);</h3>
			<p>Insert several element with same value at the pos.</p>
		</div>
		<div id="insert(int, const T*, int)">
			<h3>inline bool insert(int pos, const T* values, int size);</h3>
			<p>Insert a lot of elements at the pos from values.</p>
		</div>
		<div id="insert(int, const BArray&,int,int)">
			<h3>inline bool insert(int pos, const BArray& other, int first = 0, int count = -1);</h3>
			<p>Insert some elements in the specail range from other array at the pos.</p>
		</div>
		<div id="remove(int,int)">
			<h3>inline bool remove(int pos, int count = 1);</h3>
			<p>Removes elements in the range from pos.</p>
		</div>
		<div id="remove(const UT&)">
			<h3>inline bool remove(const UT& value);</h3>
			<p>Remove the first element equals the value.</p>
		</div>
		<div id="remove(const BArray<UT>&)">
			<h3>inline bool remove(const BArray&ltUT&gt& other);</h3>
			<p>Remove every last one of the other array from this array.</p>
		</div>
		<div id="removeAll(const UT&)">
			<h3>inline int removeAll(const UT& value);</h3>
			<p>Remove every last one of elements equals value.</p>
		</div>
		<div id="sort(int)">
			<h3>inline bool sort(int direction = 1);</h3>
			<p>Sort this array to direction, if direction is bigger the 0, front element will be less or equals the next one. if direction is 0 this does't work.</p>
		</div>
		<div id="at(int)">
			<h3>inline T& at(int index);</h3>
			<p>Get the element at index position, this function will check the index, if index is invalid this will return the default element. This is s</p>
		</div>
		<div id="at(int)">
			<h3>inline const T& at(int index) const;</h3>
		</div>
		<div id="operator()(int)">
			<h3>inline T& operator()(int index);</h3>
			<p>Some function as at(index).</p>
		</div>
		<div id="operator()(int)">
			<h3>inline const T& operator()(int index) const;</h3>
		</div>
		<div id="operator[](int)">
			<h3>inline T& operator[](int index);</h3>
			<p>Get the element at index position without checking the index, if you are sure of index use this calling, if this array could be empty or index is't sure to be valid, don't call this, because failure will crush you program.</p>
		</div>
		<div id="operator[](int)">
			<h3>inline const T& operator[](int index) const;</h3>
		</div>
		<div id="operator = (const T&)">
			<h3>inline const BArray& operator = (const T& value);</h3>
			<p>Reset this array to have only one element of the value, then return this array.</p>
		</div>
		<div id="operator = (const BArray&)">
			<h3>inline const BArray& operator = (const BArray& other);</h3>
			<p>Copy all data from other array and return this array.</p>
		</div>
		<div id="operator + (const UT&)">
			<h3>inline BArray operator + (const UT& value) const;</h3>
			<p>
				 Returns a array that contains all the items in this vector followed by a item of the value. </p>
		</div>
		<div id="operator + (const BArray&)">
			<h3>inline BArray operator + (const BArray& other) const;</h3>
			<p>
				 Returns a array that contains all the items in this vector followed by all the items in the other array. </p>
		</div>
		<div id="operator += (const UT&)">
			<h3>inline void operator += (const UT& value);</h3>
			<p>Append a item of the value.</p>
		</div>
		<div id="operator += (const BArray&)">
			<h3>inline void operator += (const BArray& other);</h3>
			<p>Appends the items of the other array to this array.</p>
		</div>
		<div id="operator -= (const UT&)">
			<h3>inline void operator -= (const UT& value);</h3>
			<p>Remove an element from the tail of this array, the last element must equal the value otherwise will fail.</p>
		</div>
		<div id="operator -= (const BArray&)">
			<h3>inline void operator -= (const BArray& other);</h3>
			<p>Remove element from the array's tail, the last elements must equal the other array's elements.</p>
		</div>
		<div id="operator << (const UT&)">
			<h3>inline BArray& operator << (const UT& value);</h3>
			<p>Equals append(value), then return this array.</p>
		</div>
		<div id="operator << (const BArray&)">
			<h3>inline BArray& operator << (const BArray& other);</h3>
			<p>Equals append(other), then return this array.</p>
		</div>
		<div id="operator >> (UT&)">
			<h3>inline void operator >> (UT& value);</h3>
			<p>Assigns the last element to the value than remove it, equals pop(value).</p>
		</div>
		<div id="operator >> (BArray&)">
			<h3>inline void operator >> (BArray& other) const;</h3>
			<p>The other array append this array, then this array will be returned.</p>
		</div>
		<div id="operator == (const BArray&)">
			<h3>inline bool operator == (const BArray& other) const;</h3>
			<p/>
		</div>
		<div id="operator != (const BArray&)">
			<h3>inline bool operator != (const BArray& other) const;</h3>
			<p/>
		</div>
	</body>
</html>